/**
 * mode.h
 * Description: The operating mode of the system
 * Authors: Hamish Cumming, Brian Thorne 2008
 */

#ifndef MODE_H_INCLUDED
#define MODE_H_INCLUDED


#include "global.h"


/** modes */
typedef enum {REPLAY=0,MEASURE=1, IDLE=2} mode_t;

/* Functions */

/**
 * Called from ui to change the mode
 * @param new_mode The mode to change to
 */
void set_mode(mode_t new_mode);

/**
 * Called to get the mode
 * @return The current operating mode
 */
mode_t get_mode(void);

/**
 * Provides a way for tasks to use the joystick (scrolling stats for exmple)
 * @param dir The joystick action to pass on to the current mode
 */
void mode_action(direction_t dir);

#endif // MODE_H_INCLUDED
